import 'package:flutter/services.dart';

FilteringTextInputFormatter get percentInputFormatter =>
    FilteringTextInputFormatter.allow(RegExp(r'\d+(\.)?\d*\%?$'));

FilteringTextInputFormatter get percentInputFormatter2 =>
    FilteringTextInputFormatter.allow(RegExp(r'([1-9]?\d|9999)$'));

FilteringTextInputFormatter get percentInputFormatter4 =>
    FilteringTextInputFormatter.allow(
        RegExp(r'^(?:100(?:\.00?)?|\d?\d(?:\.\d\d?)?)$'));

FilteringTextInputFormatter get percentInputFormatter3 =>
    FilteringTextInputFormatter.allow(RegExp(r'([-]?[1-9]?[\d|9999]?)$'));

FilteringTextInputFormatter get leaveDaysInputFormatter =>
    FilteringTextInputFormatter.allow(RegExp(r'^\d+(\.)?[5]{0,1}'));

FilteringTextInputFormatter get doubleLimit2InputFormatter =>
    FilteringTextInputFormatter.allow(RegExp(r'^\d+(\.)?[0-9]{0,2}'));

FilteringTextInputFormatter get doubleInputFormatter =>
    FilteringTextInputFormatter.allow(RegExp(r'^\d+(\.)?(\d+)?'));

FilteringTextInputFormatter get doubleInputAllowNegativeFormatter =>
    FilteringTextInputFormatter.allow(RegExp(r'^([-]?(\d+(\.)?(\d+)?)?)'));

FilteringTextInputFormatter get intInputFormatter =>
    FilteringTextInputFormatter.allow(RegExp(r'^\d+'));
